import ballerina/io;
public function main() {
// Open a Byte Channel that funnels bytes from the file
io:ReadableByteChannel srcCh = io:openReadableFile("./example.json");
// Open a Char Channel that converts the bytes to characters
// (using the UTF-8 spec)
io:ReadableCharacterChannel srcCCh = new(srcCh, "UTF-8");
// Print the output of the character channel, interpreting it as
// JSON data
io:println(srcCCh.readJson());
}